Skip to content

Failure notification on the daily sync and add persist-credentials: false and a permissions. - #74

Open
whisper67265 wants to merge 5 commits into
cppalliance:masterfrom
whisper67265:feature/sync-failure-slack-alerts
Open

Failure notification on the daily sync and add persist-credentials: false and a permissions.#74
whisper67265 wants to merge 5 commits into
cppalliance:masterfrom
whisper67265:feature/sync-failure-slack-alerts

Conversation

@whisper67265

@whisper67265 whisper67265 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Close #66, close #67.

Summary by CodeRabbit

  • New Features

    • Added Slack notifications for translation workflow failures and stale synchronization heartbeat alerts.
    • Notifications include workflow links, affected languages, and failed-job details.
  • Documentation

    • Documented the required Slack webhook configuration in setup guides and the changelog.
  • Security

    • Limited workflow repository permissions and prevented automatic reuse of checkout credentials.
  • Tests

    • Added coverage for notification formatting, delivery, failure handling, webhook validation, and heartbeat alerts.

@whisper67265

Copy link
Copy Markdown
Collaborator Author

@coderabbitai, review

@whisper67265

Copy link
Copy Markdown
Collaborator Author

@coderabbitai, fullreview

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b71a6c5-df29-4a85-a02d-d0a2ba2630b4

📥 Commits

Reviewing files that changed from the base of the PR and between 09f8237 and 3a52790.

📒 Files selected for processing (6)
  • .github/workflows/assets/notify.sh
  • .github/workflows/heartbeat.yml
  • README.md
  • docs/GETTING-STARTED.md
  • tests/helpers/http_mock.bash
  • tests/test_notify.bats
🚧 Files skipped from review as they are similar to previous changes (6)
  • README.md
  • docs/GETTING-STARTED.md
  • .github/workflows/heartbeat.yml
  • tests/test_notify.bats
  • tests/helpers/http_mock.bash
  • .github/workflows/assets/notify.sh

📝 Walkthrough

Walkthrough

The workflows now send Slack alerts for translation sync failures and stale heartbeat checks. A shared notification script builds workflow URLs, failed-job summaries, and Slack payloads. Tests mock Slack requests and validate notification behavior. Checkout permissions are restricted and persisted credentials are disabled.

Changes

Slack alerting

Layer / File(s) Summary
Notification construction and delivery
.github/workflows/assets/notify.sh
Adds helpers for workflow URLs, failed-job summaries, Slack payloads, webhook delivery, sync failure alerts, and stale heartbeat alerts.
Workflow integration and access configuration
.github/workflows/sync-translation.yml, .github/workflows/heartbeat.yml, .github/workflows/add-submodules.yml, README.md, docs/GETTING-STARTED.md, CHANGELOG.md
Adds notification workflow steps, documents SLACK_WEBHOOK_URL, updates checkout behavior, and records the alert changes.
Notification validation and lint coverage
tests/test_notify.bats, tests/helpers/common.bash, tests/helpers/http_mock.bash, scripts/lint.sh
Adds notification loading, Slack request mocking, Bats tests, and ShellCheck coverage.

Estimated code review effort: 3 (Moderate) | ~22 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: henry0816191

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the main changes: daily sync failure notifications and workflow credential permissions.
Linked Issues check ✅ Passed The changes implement issue #66 requirements, including Slack alerts, stale heartbeat handling, secret documentation, shared tooling, and Bats coverage.
Out of Scope Changes check ✅ Passed The workflow, documentation, security, tooling, and test changes are directly related to the linked issue objectives.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/assets/notify.sh:
- Around line 52-60: Update send_slack_notification so its curl request includes
short connection and total request timeouts via --connect-timeout and
--max-time, while preserving the existing POST payload, headers, webhook URL,
and failure behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 499b07c4-6535-4869-91c2-3a5bad136b50

📥 Commits

Reviewing files that changed from the base of the PR and between 01fa10d and 2de973d.

📒 Files selected for processing (11)
  • .github/workflows/add-submodules.yml
  • .github/workflows/assets/notify.sh
  • .github/workflows/heartbeat.yml
  • .github/workflows/sync-translation.yml
  • CHANGELOG.md
  • README.md
  • docs/GETTING-STARTED.md
  • scripts/lint.sh
  • tests/helpers/common.bash
  • tests/helpers/http_mock.bash
  • tests/test_notify.bats

Comment thread .github/workflows/assets/notify.sh
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

@whisper67265, I will review the changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

@whisper67265, I will perform a complete review of pull request #74.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/GETTING-STARTED.md`:
- Around line 58-64: Update the workflow-specific requirements section in
GETTING-STARTED.md to state that sync-translation requires SYNC_TOKEN and
notify-failure requires SLACK_WEBHOOK_URL. Keep the existing descriptions and
formatting consistent with the surrounding documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4bb3b067-ff42-4030-9370-c22055b3f541

📥 Commits

Reviewing files that changed from the base of the PR and between 01fa10d and 3aa8a53.

📒 Files selected for processing (11)
  • .github/workflows/add-submodules.yml
  • .github/workflows/assets/notify.sh
  • .github/workflows/heartbeat.yml
  • .github/workflows/sync-translation.yml
  • CHANGELOG.md
  • README.md
  • docs/GETTING-STARTED.md
  • scripts/lint.sh
  • tests/helpers/common.bash
  • tests/helpers/http_mock.bash
  • tests/test_notify.bats

Comment thread docs/GETTING-STARTED.md Outdated
@whisper67265
whisper67265 requested a review from wpak-ai July 31, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add persist-credentials: false and a permissions: block to add-submodules.yml Failure notification on the daily sync

2 participants